#include "ThreadPool.hpp"
#include "Thread.hpp"
#include "LockGuard.hpp"
#include "Task.hpp"
#include <cstdlib>
#include <ctime>
#include<unistd.h>

int main()
{
    srand((unsigned int)time(nullptr)^pthread_self());
    ThreadPool<Task>* tp = new ThreadPool<Task>(12);
    tp->start();
    while(true)
    {
        int x = rand()%20+1;
        int y = rand()%10+1;
        char op = "+-*/%"[rand()%5];
        Task t(x,y,op);
        tp->Push(t);
        usleep(100);
    }
    return 0;
}
